<template>
    <div>
        useRouter WrapperPage
        <span @click="gotoFirstPage">点击跳转到firstPage</span>
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        name: "useRouter",
        mounted () {
            console.log(this.$route.meta)
        },
        methods:{
            gotoFirstPage () {
                //两种方式一种是用name 跳转，一种使用path跳转
                // 只有传Name时，使用params才能传递过去，一般用query就行了
                // this.$router.push({name: 'firstPage', params: {type: 'query'}})
                this.$router.push({path: '/useRouter/firstPage', query: {type: 'query'}})
            }
        }
    }
</script>

<style scoped>

</style>